import axios from 'axios';
import NProgress from "nprogress"
import "nprogress/nprogress.css"

let baseURL = 'http://110.42.173.81:8085';

const http = axios.create({ baseURL, timeout: 30000 });
http.interceptors.request.use(config => {
	NProgress.start()
  config.headers['Content-Type'] = 'application/json';
  return config;
});
http.interceptors.response.use(config => {
	NProgress.done()
  return config;
});

export { http, baseURL };
